import React, { PureComponent } from 'react';

import { Switch } from 'antd';

class Status extends PureComponent{

    render(){
        const { value, ontext, offtext, onClick } = this.props;

        return(
            <Switch checkedChildren={ontext} unCheckedChildren={offtext} checked={value>0 && value===1} onChange={onClick} />
        )
    }
}

export default Status;